CC   = gcc.exe

LDFLAGS =  -L -lcomctl32 -mwindows 
DEFS =
CFLAGS = -Os -Wall -I thirdparty/ugui
BIN  = ugui.exe
RM = rm -rf 
SRC = $(wildcard *.c app/*.c lib/*.c thirdparty/*/*.c) 
OBJS    = $(ASRC:.s=.o) $(SRC:.c=.o) 

.PHONY: all clean

all: $(BIN)

%.o: %.c
	$(CC) -c $(CFLAGS) $(DEFS) -I . $(INCDIR) $< -o $@

clean:
	${RM} $(OBJS) $(BIN) *~ .*.swp

$(BIN): $(OBJS)
	$(CC) $(OBJS) $(LDFLAGS) -o $(BIN)
	strip.exe $(BIN)
